package com.order.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.order.mapper.OrderMapper;
import com.order.pojo.Order;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @className: OrderService
 * @Description: 服务层
 * @author: JiaZhenpeng
 * @data: 2022/11/1312:41
 */
@Slf4j
@Service
public class OrderService {


    @Autowired
    private OrderMapper orderMapper;


    public Order queryOrderById(Long orderId) {
        Order order = orderMapper.findById(orderId);
        return order;
    }

    @SentinelResource("goods")
    public String queryGoods(){
        log.info("query goods !!");
        return "查询商品";
    }
}
